package com.me.test.domain;

import org.apache.ibatis.type.Alias;

import java.util.List;
import java.util.StringJoiner;

/**
 * 简单的 user 实体，sys_user
 *
 * @author ME
 */
@Alias("User")
public class User {

  private Long id;
  private String name;
  private Integer age;
  private List<Person> familyMember;

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public Integer getAge() {
    return age;
  }

  public void setAge(Integer age) {
    this.age = age;
  }

  public List<Person> getFamilyMember() {
    return familyMember;
  }

  public void setFamilyMember(List<Person> familyMember) {
    this.familyMember = familyMember;
  }

  @Override
  public String toString() {
    return new StringJoiner(", ", User.class.getSimpleName() + "[", "]")
            .add("id='" + id + "'")
            .add("name='" + name + "'")
            .add("age=" + age)
            .toString();
  }
}
